package main

import (
	"fmt"
)

func main() {
	//fmt.Printf("hello world!")

	//block := GenesisBlock(genesisInfo, []byte{})
	bc := NewBlockChain()
	bc.AddBlock("班长向老师转了1枚比特币！")
	bc.AddBlock("班长又向老师转了1枚比特币！")

	for i, block := range bc.Blocks {
		fmt.Println("======== block height : ", i, "=======")
		fmt.Printf("PreHash : %x\n", block.PreHash)
		fmt.Printf("Hash : %x\n", block.Hash)
		fmt.Printf("Data : %s\n", block.Data)
	}
}
